package com.room.reservation.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.room.reservation.mapper.RoomReservationMapper;
import com.room.reservation.domain.RoomReservation;
import com.room.reservation.service.IRoomReservationService;

/**
 * 自习室预约管理Service业务层处理
 * 
 * @author FMBOY
 * @date 2025-11-16
 */
@Service
public class RoomReservationServiceImpl implements IRoomReservationService 
{
    @Autowired
    private RoomReservationMapper roomReservationMapper;

    /**
     * 查询自习室预约管理
     * 
     * @param id 自习室预约管理主键
     * @return 自习室预约管理
     */
    @Override
    public RoomReservation selectRoomReservationById(Long id)
    {
        return roomReservationMapper.selectRoomReservationById(id);
    }

    /**
     * 查询自习室预约管理列表
     * 
     * @param roomReservation 自习室预约管理
     * @return 自习室预约管理
     */
    @Override
    public List<RoomReservation> selectRoomReservationList(RoomReservation roomReservation)
    {
        return roomReservationMapper.selectRoomReservationList(roomReservation);
    }

    /**
     * 新增自习室预约管理
     * 
     * @param roomReservation 自习室预约管理
     * @return 结果
     */
    @Override
    public int insertRoomReservation(RoomReservation roomReservation)
    {
        return roomReservationMapper.insertRoomReservation(roomReservation);
    }

    /**
     * 修改自习室预约管理
     * 
     * @param roomReservation 自习室预约管理
     * @return 结果
     */
    @Override
    public int updateRoomReservation(RoomReservation roomReservation)
    {
        return roomReservationMapper.updateRoomReservation(roomReservation);
    }

    /**
     * 批量删除自习室预约管理
     * 
     * @param ids 需要删除的自习室预约管理主键
     * @return 结果
     */
    @Override
    public int deleteRoomReservationByIds(Long[] ids)
    {
        return roomReservationMapper.deleteRoomReservationByIds(ids);
    }

    /**
     * 删除自习室预约管理信息
     * 
     * @param id 自习室预约管理主键
     * @return 结果
     */
    @Override
    public int deleteRoomReservationById(Long id)
    {
        return roomReservationMapper.deleteRoomReservationById(id);
    }
}
